/*
 * @(#)PersonBO.java $version 2010. 8. 11
 *
 * Copyright 2007-2010 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nhncorp.usf.core.service.mock;

import org.apache.commons.collections.MapUtils;

import java.util.Map;

/**
 * @author Web Platform Development Team
 */
public class PersonBO {
	public Person getPerson( String name, int age) {
		return new Person( name, age);
	}
	
	public String getNameOfPersonObject( Person person) {
		return person.getName();
	}
	
	public String getNameOfPersonMap( Map<String, Object> person) {
		return (String)person.get("name");
	}
	
	public int getTotalOfAge( Map<String, Object> person1, Map<String, Object> person2) {
		return MapUtils.getInteger(person1, "age") + MapUtils.getInteger(person2, "age"); 
	}
}

